package com.vben.gateway.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.Configuration;

import java.util.ArrayList;
import java.util.List;

/**
 * 黑白名单配置
 */
@Data
@RefreshScope
@Configuration
@ConfigurationProperties("security")
public class AllowAndBlockConfig {

    /**
     * 放行白名单配置，网关不校验此处的白名单
     */
    private List<String> allow = new ArrayList<>();

    /**
     * 拦截黑名单配置，网关总是会拦截此处的黑名单
     */
    private List<String> block = new ArrayList<>();

}
